package spring;

public class MyBean {

    private static int instanceCounter = 0;
    private int instanceNumber;

    public MyBean() {
        instanceNumber = ++instanceCounter;
        System.out.println("Creating MyBean instance: " + instanceNumber);
    }

    public int getInstanceNumber() {
        return instanceNumber;
    }

}
